<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
	pageEncoding="ISO-8859-1"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>



<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<jsp:include page="Header.jsp"/>

<title>Employees </title>
</head>
<body>
<jsp:include page="AdminNav.jsp"/>
<script >
$(document).ready(function() {
	oTable = $('#example').dataTable({
		"bJQueryUI": true,
		"sPaginationType": "full_numbers"
	});
} );

</script>
	<h2>Employees </h2>
	<div class= "col-md-10 panel panel-success">
	<table id="example" class="table table-hover" >
		<thead>
			<tr>
				<td>Name</td>
				<td>Role</td>
				<td>Reporting to Id</td>
				<td>Email</td>
				<td>Contact Number</td>
				<td>Department</td>
				<td>Medical Leave Taken</td>
				<td>Annual Leaves Taken</td>
				<td>Edit/Delete</td>
			</tr>
		</thead>
		<tbody>
			<c:forEach var="employee" items="${empList}">
				<tr>
					<td>${employee.name}</td>
					<td>${employee.role}</td>
					<td>${employee.reportingTo.name}</td>
					<td>${employee.email}</td>
					<td>${employee.contactNo}</td>
					<td>${employee.departmant}</td>
					<td>${employee.annualLeavesTaken}</td>
					<td>${employee.medicalLeavesTaken}</td>
					<td><a
						href="${pageContext.request.contextPath}/employee/edit/${employee.employeeId}.html">Edit/</a>
						<a
						href="${pageContext.request.contextPath}/employee/delete/${employee.employeeId}.html">Delete</a></td>
				</tr>
			</c:forEach>
		</tbody>
	</table>
	</div>
	
	
	<jsp:include page="footer.jsp"/>
</body>
</html>